#! /bin/sh

name=make
version=4.4.1
revision=1
tarball_url="https://ftp.gnu.org/gnu/make/make-${version}.tar.gz"
tarball_blake2b="09a4ad8060259e36854b525ab610fd317a86f4926e44e3ab8adba75dccc8d4b445df9dd25ccfb4c25a54bc0e98238a9127e36401d74cbc3503a329eadcdf4995"
hostdeps="gcc pkg-config"
deps="core-libs"

prepare() {
    autotools_recursive_regen
}

configure() {
    autotools_configure \
        CFLAGS="$TARGET_CFLAGS -std=gnu17"
}

build() {
    make -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" make install

    post_package_strip
}
